<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>志愿活动</title>
    <link rel="stylesheet" href="../../addons/party_member/public/css/weui.min.css">
    <link rel="stylesheet" href="../../addons/party_member/public/css/jquery-weui.min.css">

    <!-- body 最后 -->
    <script src="../../addons/party_member/public/js/jquery.min.js"></script>
    <script src="../../addons/party_member/public/js/jquery-weui.min.js"></script>

    <!-- 如果使用了某些拓展插件还需要额外的JS -->
    <script src="../../addons/party_member/public/js/swiper.min.js"></script>
    <script src="../../addons/party_member/public/js/city-picker.min.js"></script>
    <script src="../../addons/party_member/public/js/function.js"></script>
    <style>
        body{
            font-family: 微软雅黑;
            margin: 0;
            padding: 0;
            background: #f9f9f9;

        }
        .head{
            display: block;
            position: relative;
            width: 100%;
            height: 43px;
            background: #ffffff;
            text-align: center;
            font-size: 18px;
            line-height: 43px;
            font-family: -webkit-body;
            color: #333333;

        }
        .head_return{
            display: inline-block;
            position: absolute;
            left: 10px;
            top: 10px;
            width: 20px;
            height: 23px;
            background: url("../addons/party_member/public/image/evaluation/return.png") no-repeat;
            background-size: 12px 23px;

        }

        .banner{
            position: relative;
            display: block;
            width: 100%;
            height: 200px;
            background: url("../addons/party_member/public/image/activities/acbg.png") no-repeat;
            background-size: 100% 200px;
        }


        .banner_info span{
            display: block;
            margin: auto;
            color: #ffffff;
        }

        .table_main{
            display: block;
            margin-top: 10px;
            width: 100%;
            height: auto;
        }
        .table_head{
            display: block;
            margin-top: 20px;
            height: 20px;
            border-left: 5px solid red;
            padding-left: 10px;
            color: #a7a7a7;
            line-height: 20px;
        }

        .star_pic span{
            display: inline-block;
            margin: auto;
            width: 20px;
            height: 20px;
            background: url(../addons/party_member/public/image/evaluation/star.png) no-repeat;
            background-size: 20px 20px;
        }

        .more_info span{
            display: inline-block;
            width: 13px;
            height: 9px;
            background: url(../addons/party_member/public/image/evaluation/more_btn.png) no-repeat;
            background-size: 13px 9px;
        }
        .weui_cell_ft{
            text-align: right;
            color: #888;
        }
        .weui_cell_ft:after{
            content: " ";
            display: inline-block;
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
            height: 13px;
            width: 13px;
            border-width: 2px 2px 0 0;
            border-color: #c8c8cd;
            border-style: solid;
            position: relative;

            top: -21px;
            margin-left: .3em;
        }
        h4{
            display: inline-block;
        }
        .weui-bar__item--on:after{
            content: " ";
            position: absolute;
            bottom: 0;
            top: 100%;
            width: 80%;
            right: 10%;
            height: 1px;
            border-top: 3px solid red;
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 10%;

        }
        .weui-bar__item--on:before{
            content: " ";
            position: absolute;
            bottom: 0;
            top: 100%;
            width: 80%;
            right: 10%;
            height: 1px;
            border-top: 3px solid red;
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 10%;

        }
        .table_body {
            color: #888888;
            position: relative;
            width: 100%;
            background: url(../addons/party_member/public/image/evaluation/bodybg.png);
            background-size: cover;
        }
        .table_body:before{
            content: " ";
            position: absolute;
            top: 54px;
            width: 90%;
            right: 5%;
            height: 1px;
            border-top: 2px solid #888888;
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 5%;
        }
        .btn{
            text-align: center;
            margin-top: 30px
        }
        .btn input{
            width: 40%;
            height: 50px;
            font-size: 20px;
            font-weight: bold;
            margin: 0 4%;
        }
    </style>
</head>
<body>

<div class="head">
    <span class="head_return"></span>
    志愿活动
</div>
<div class="banner"></div>
<div class="table_main">

    <div class="table_body">
        <div  style="width: 100%">
            <h3 style="text-align: center;color: #333333">{$item['topic']}</h3>
            <span style="width:45%;color: #cccccc;text-align: center;display: inline-block">来源：{$item['author']}</span>
            <span style="display: inline-block;color: #cccccc;width:53%;text-align: center">发布时间：{$item['time']}</span>
        </div>
        <!--        <span class="table_head">各位党员：大家好</span>

                <div style="margin-top: 5px;padding: 5px;">为进一步贯彻落实全面从严治党要求，充分发挥党的政治核心作用，特展开基础调研工作</div>
                <div style="margin-top: 5px;padding: 5px;">
                    <p>活动时间：2017.6.1-2017.6.3</p>
                    <p>活动地点：漳州市漳州支部</p>
                </div>
                <div style="margin-top: 5px;padding: 5px;">活动内容：</div>
                <div style="margin-top: 5px;padding: 5px;">为结合为结合为结合为结合为结合为结合为结合为结合为结合为结合为结合为</div>-->

        <div style="padding: 0 15px">

            {$item['activityinfo']}

        </div>

    </div>
    <div class="btn">
        {if $status==false}
        <input id="sign" class="weui-btn weui-btn_mini weui-btn_warn" type="submit" name="subimt" value="立即报名"/>
        <input style="background-color: #cccccc" class="weui-btn weui-btn_mini weui-btn_warn" type="submit" value="取消报名" disabled="none"/>
        {else}
        <input style="background-color: #cccccc" class="weui-btn weui-btn_mini weui-btn_warn" type="submit" name="subimt" value="立即报名" disabled="none"/>
        <input id="cancel"  class="weui-btn weui-btn_mini weui-btn_warn" type="submit" value="取消报名"/>
        {/if}
    </div>
    <div>
        <span>&nbsp;</span>
    </div>
</div>
<script>
    $("img").each(function (index,element) {
        var src = $(element).attr('src')
        if(src.substr(0,4)!="http"){
            src= "{$host}"+src
        }

        //  document.write(src)
        $(element).attr('src',src)
    })



    $("#sign").click(function () {
        $.showLoading();
        $.post('{php echo $this->createMobileUrl("ajaxSign")}',{
            id:"{$item['id']}",
            type:3
        },function (data) {
            $.hideLoading();
            if(data['status']){
                $.alert(data['result'], "提示",function () {
                    window.location.reload()
                });

            }else{
                $.alert(data['result'], "提示");
            }
        },'json')
    })

    $("#cancel").click(function () {
        $.showLoading();
        $.post('{php echo $this->createMobileUrl("ajaxSign")}',{
            id:"{$item['id']}",
            type:4
        },function (data) {
            $.hideLoading();
            if(data['status']){
                $.alert(data['result'], "提示",function () {
                    window.location.reload()
                });

            }else{
                $.alert(data['result'], "提示");
            }
        },'json')
    })

</script>
</body>
</html>